/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package wizard;

/**
 *
 * @author afspear
 */
public class ScoutPlayer extends Player {
    
    public ScoutPlayer(PlayerName name) {
        super(name);
        this.role = PlayerRole.runner;
    }
    
    @Override
    public boolean canBeCaught() {
        boolean ans = true;
        if (possession != null) {
            if (this.possession.getType() == ObjectType.balloon) {
                ans = false;
                //TODO log that player flew away
            }
            }
        return ans;
        }
    
    
    @Override
    public void find(Objects object) {
        if (object.getType() == ObjectType.balloon) {
            object.found(true);
            this.setPossessions(object);
            log.logAction("find", this.name.toString(), object.getType().toString());
        }
    }
}
